Working With Track Time
The Movie Toolbox provides several functions that allow your application to determine and establish a track's time parameters. A track uses the time base of the movie that contains the track; therefore there are no functions that work with a track's time base or time scale. However, you can determine a track's duration and its offset from the start of a movie.All of the tracks in a movie use the movie's time coordinate system. That is, the movie's time scale defines the basic time unit for each of the movie's tracks. Each track begins at the beginning of the movie, but the track's data might not begin until some time value other than 0. This intervening time is represented by blank space--in an audio track the blank space translates to silence; in a video track the blank space generates no visual image. This blank space is the track offset. Each track has its own duration. This duration need not correspond to the duration of the movie. A movie duration always equals the maximum track duration. See Figure 2-6 on page 2-10 for a visual representation of track duration and track offset.
You can use the
GetTrackDuration
function to determine a track's duration.The
SetTrackOffset
andGetTrackOffset
functions enable you to work with a track's offset from the start of the movie that contains it.The
TrackTimeToMediaTime
function lets you translate a track's time to the corresponding time value of a media in the track.
Subtopics
- GetTrackDuration
- SetTrackOffset
- GetTrackOffset
- TrackTimeToMediaTime